﻿using System.Runtime.Serialization;
using Newtonsoft.Json;

namespace Spikes.ActivityStreams
{
    /// <summary>
    /// Some types of objects may have an alternative visual representation in the form of an image, video or embedded HTML fragments. A Media Link represents a hyperlink to such resources.
    /// </summary>
    [JsonObject()]
    [DataContract]
    public partial class MediaLink
    {
        /// <summary>
        /// A hint to the consumer about the length, in seconds, of the media resource identified by the url property.
        /// </summary>
        [JsonProperty(PropertyName = "duration")]
        [DataMember(Name = "duration")]
        public int Duration;

        /// <summary>
        /// A hint to the consumer about the height, in pixels, of the media resource identified by the url property.
        /// </summary>
        [JsonProperty(PropertyName = "height")]
        [DataMember(Name = "height")]
        public int Height;

        /// <summary>
        /// The IRI of the media resource being linked.
        /// </summary>
        [JsonProperty(PropertyName = "url")]
        [DataMember(Name = "url")]
        public string Url;

        /// <summary>
        /// A hint to the consumer about the width, in pixels, of the media resource identified by the url property.
        /// </summary>
        [JsonProperty(PropertyName = "width")]
        [DataMember(Name = "width")]
        public int Width;
    }
}
